package sublinear.model;

import java.util.ArrayList;

public class DummyGraph extends AbstractGraph {

	@Override
	public ArrayList<GraphNode> getNeighbors(GraphNode node) {
		ArrayList<GraphNode> neighbors = new ArrayList<GraphNode>();
		long id = node.getUniqueId();
		if (id == 1) 
		{
			GraphNode second = new GraphNode(2, "Second Node");
			GraphNode third = new GraphNode(3, "Third Node");
			neighbors.add(second);
			neighbors.add(third);
		}
		else if (id == 2)
		{
			GraphNode third = new GraphNode(3, "Third Node");
			neighbors.add(third);
		}
		else if (id == 3)
		{
			GraphNode first = new GraphNode(1, "First Node");
			neighbors.add(first);
		}
		return neighbors;
	}

	@Override
	public GraphNode getRandomNode() {
		// No randomness here
		GraphNode first = new GraphNode(1, "First Node");
		return first;
	}

	@Override
	public long getSize() {
		return 3;
	}

}
